<!DOCTYPE html>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="UTF-8">
<title>牢牢甜海淘群 后台登陆</title>
<link rel="stylesheet" type="text/css" href="css/login.css">
<script type="text/javascript" src="js/js.js" ></script>
<script src="https://cdn.bootcss.com/jquery/1.8.3/jquery.min.js"></script>
<script>
	$(function(){
		//回车事件绑定
		$('.login_input').bind('keydown', function(event) {
		　　if (event.keyCode == "13") {
		　　　　//回车执行查询
		　　　　$('#loginButton').click();
		　　}
		});
	});
	function loginAjax(){
		$.ajax({
			url : '../LoginServlet',
			method : 'POST',
			data : {
				'operation' : 'adminlogin',
				'username' : $('#username').val(),
				'password' : $('#password').val()
			},
			dataType : 'json',
			success : function(json) {
				if (json.message == '登录成功！')
					top.window.location='dashboard.html';
				else alert(json.message);
			}
		});
	}
</script>
<body>
<div class="tyg-div">
	<ul>
    	<li>让</li>
    	<li><div style="margin-left:20px;">数</div></li>
    	<li><div style="margin-left:40px;">据</div></li>
    	<li><div style="margin-left:60px;">改</div></li>
    	<li><div style="margin-left:80px;">变</div></li>
    	<li><div style="margin-left:100px;">生</div></li>
    	<li><div style="margin-left:120px;">活</div></li>
    </ul>
</div> 
<div id="contPar" class="contPar">
	<div id="page1"  style="z-index:1;">
		<div class="title0">后台管理系统</div>
		<div class="title1">牢牢甜海淘群</div>
		<div class="imgGroug">
			<ul>
				<li>
					<img alt="" class="img0 png" src="./img/page1_0.png" />
					<img alt="" class="img1 png" src="./img/page1_1.png" />
					<img alt="" class="img2 png" src="./img/page1_2.png" />
				</li>
			</ul>
		</div>
		<img alt="" class="img3 png" src="./img/page1_3.jpg">
	</div>
</div>
<div class="tyg-div-denglv">
	<div class="tyg-div-form">
		<form action="" method="post" onsubmit="">
			<h2>登录</h2><p class="tyg-p">欢迎访问  牢牢甜后台</p>
			<div style="margin:5px 0px;">
				<input class="login_input" type="text" placeholder="请输入账号..." required id="username" pattern="^\w{3,12}$"/>
			</div>
			<div style="margin:5px 0px;">
				<input class="login_input" type="password" placeholder="请输入密码..." required id="password" pattern="^\w{3,16}$"/>
			</div>
			<button id="loginButton" type="button" onclick="loginAjax()">登<span style="width:20px;"></span>录</button>
		</form>
	</div>
</div>
<script type="text/javascript" src="./js/com.js"></script>
<!--[if IE 6]>
<script language="javascript" type="text/javascript" src="./script/ie6_png.js"></script>
<script language="javascript" type="text/javascript">
DD_belatedPNG.fix(".png");
</script>
<![endif]-->
</body>
</html>